package com.shadow.dataentities.systemdata
{
	/**
	 *资源数据实体数据用于从系统配置内读取对应的key并绑定到资源基础属性上 
	 * @author Administrator
	 * 
	 */	
	public class AssetEntity extends BaseEntity
	{
		//资源id
		public var id:uint;
		//资源名称
		public var item_name:String;
		//描述
		public var description:String;
		//资源地址
		public var item_url:String;
		//资源类型
		public var item_type:String;
		//系统键
		public var system_key:String;
		
		public var size_x:int;
		public var size_y:int;
		//侦查范围
		public var search_range:Array;
		//攻击范围
		public var attack_range:Array;
		//重新加载时间
		public var reload_time:uint;
		public var tree:Array;
		public var rice:Array;
		public var gold:Array;
		public var health:Array;
		public var damage:Array;
		public var defence:Number;
		public var upkeep:Array;
		
		public function AssetEntity(item:Object)
		{
			super();
			var key:*;
			for (key in item){
				if(hasOwnProperty(key.toString())){
					try{
					
						this[key.toString()] = item[key];
					}catch(error:Error){
						trace("检查系统配置是否有错误的属性设置");
					}
				}
			}
		}
	}
}